package com.sh.data.engine.application.model.mapper.workspace;

import com.sh.data.engine.application.model.dto.workspace.BaseProjectDTO;
import com.sh.data.engine.application.model.dto.workspace.ProjectDTO;
import com.sh.data.engine.domain.workspace.index.model.domain.BaseProjectDomain;
import com.sh.data.engine.domain.workspace.index.model.domain.ProjectDomain;
import com.sh.data.engine.repository.dao.workspace.index.entity.ProjectEntity;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

/**
 * @author: mengzheng.mhc
 * @date: 2024/6/25 14:04
 */
@Mapper(componentModel = "spring")
public interface ProjectDTOMapper {

    BaseProjectDTO map(BaseProjectDomain domain);

    @Mapping(source = "storageDetailDomain", target = "storage")
    ProjectDTO map(ProjectDomain domain);

    List<BaseProjectDTO> map(List<ProjectEntity> projectEntity);
}
